package de.gwtprime.client.widgets.helper;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.PopupPanel;
import com.google.gwt.user.client.ui.Widget;

public class InfoPopup extends PopupPanel {

	private static InfoPopupUiBinder uiBinder = GWT
			.create(InfoPopupUiBinder.class);

	interface InfoPopupUiBinder extends UiBinder<Widget, InfoPopup> {
	}

	@UiField
	Button button;
	
	@UiField
	Label message;
	public InfoPopup(String message) {
		super(true);
		setWidget(uiBinder.createAndBindUi(this));
		setGlassEnabled(true);
		this.message.setText(message);
	}



	@UiHandler("button")
	void onClick(ClickEvent e) {
		InfoPopup.this.hide();
	}

	
}
